package cate.common.table.role.vip;

import cate.common.table.ESheet;
import cate.common.table.d.GDFunc;


/**
 * vip等级
 */
public class RoleVipSheet extends ESheet<RoleVipRow> {

    @Override
    public String getSheetName() {
        return "vip特权";
    }

    public RoleVipRow getByLevel(int level) {
        return get(level);
    }

    public int getExtPlayTimes(int funcId, int level) {
        RoleVipRow row = getByLevel(level);
        if (row != null) {
            switch (funcId) {
                case GDFunc.GuildFunc.BOSS:
                    return row.guildBossBuyTimes;
                default:
                    if (funcId >= GDFunc.DAILY_FB_FIRST && funcId <= GDFunc.DAILY_FB_END)
                        return row.dailyFbBuyTimes;
                    return 0;
            }
        }
        return 0;
    }
}
